package com.lyz.moil.server.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * Created with IntelliJ IDEA.
 * User: xi
 * Date: 13-12-5
 * Time: 下午4:39
 * To change this template use File | Settings | File Templates.
 */
public class OpenfireServerConfig {

    public static String OPEN_FIRE_HOST;
    public static int OPEN_FIRE_PORT;
    public static String OPEN_FIRE_DOMAIN;


    static {
        Properties prop = new Properties();
        InputStream in = OpenfireServerConfig.class.getResourceAsStream("/openfire-server.properties");
        try {
            prop.load(in);
            OPEN_FIRE_HOST = prop.getProperty("open.fire.host").trim();
            OPEN_FIRE_PORT = Integer.parseInt(prop.getProperty("open.fire.port").trim());
            OPEN_FIRE_DOMAIN = prop.getProperty("open.fire.domain").trim();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
